<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="nav" content="0" />
<meta name="acc" content="1-0" />
<title>发文管理</title>
<script type="text/javascript">
	$(document)
			.ready(
					function() {
						var date = new Date();
						$.get(
								"${ctx}/business/history/history!info.action?key=${id}&time="
										+ date, function(data) {
									$("#frame").html(data);
								});

						$("#select")
								.click(
										function() {
											var url = "${ctx }/admin/convey!png.action?id=${id}&flag=1&decorator=open&confirm=true";
											showDialogWindow(url);
										});
					});
	
	function close() {
		$.window.closeAll();
	}

	function conveyShow(id) {
		showWindow(
				'修改发文',
				'${ctx}/admin/convey!input.action?id=${id}&cFlag=1&decorator=open&confirm=true',
				{},
				function conveyReach() {
					window.location.href = "${ctx }/admin/convey!judge.action?id="
							+ id;
				});
	}

	function conveyReach(id) {
		window.location.href = "${ctx }/admin/convey!judge.action?id=" + id;
	}
</script>
</head>
<body>
	<form action="${ctx}/admin/convey!save1.action" method="post"
		id="inputForm" class="yform">
		<div id="caption">
			<h6>${licenseplateNumber}分管领导审核</h6>
		</div>
		<input type="hidden" name="id" id="id" value="${id }"> <input
			type="hidden" name="taskid" id="taskid" value="${taskid }"> <input
			type="hidden" name="status" id="status" value="06">
		<div>
			<table class="noborder">
				<tr class="type-text">
					<td>是否需要站长签发</td>
					<td colspan="3"><select name="outcome" id="outcome">
							<option value="签发">否</option>
							<option value="站长审核">是</option>
					</select></td>
				</tr>
				<tr class="type-text">
					<td>审核意见</td>
					<td colspan="3"><textarea name="view" id="view"></textarea></td>
				</tr>
			</table>
			<c:if test="${not empty attachmentSet }">
				<div id="caption">
					<h6>已有附件</h6>
				</div>
				<table>
					<c:forEach items="${attachmentSet }" var="attachment"
						varStatus="state">
						<tr id="tr${state.index }">
							<td colspan="4"><a title="下载"
								href="${ctx}/servlet/annex?id=${attachment.id}">${attachment.upfileFileName}(${attachment.type})<fmt:formatDate
										value="${attachment.fileTime}" pattern="yyyy-MM-dd" />
							</a> <span
								onclick="deleteAttachmentById('${attachment.id}','tr${state.index }')"
								class="delete" title="删除附件"></span></td>
						</tr>
					</c:forEach>
				</table>
			</c:if>
		</div>
		<div id="caption">
			<h6>${licenseplateNumber}历史记录</h6>
		</div>
		<div id="frame" class="yform"></div>
		<div class="type-button">
			<a href="javascript:conveyShow('${id}')">修改发文</a> <input
				type="submit" value="提交" class="submit"
				onclick="return isProcess();"> <input type="button"
				value="返回" class="reset" onclick="history.back()" />
		</div>
	</form>
</body>
</html>